package com.autumn.cloud.demo.common.configure;

import com.autumn.cloud.demo.common.service.ProviderCommonService;
import com.autumn.cloud.demo.common.service.impl.ProviderCommonServiceImpl;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-12-11 01:40
 **/
@Configuration
@EnableConfigurationProperties({ProviderProperties.class})
public class DemoCommonConfiguration {

    /**
     * 提供者公共服务
     *
     * @param properties 属性
     * @return
     */
    @Bean
    public ProviderCommonService providerCommonService(ProviderProperties properties) {
        return new ProviderCommonServiceImpl(properties);
    }

}
